Skip to content

GH-47389: [Python] CSV and JSON options lack a nice repr/str - #47397

Merged
AlenkaF merged 11 commits into
apache:mainfrom
thisisnic:GH-47359_repr_str_csv_json
Mar 25, 2026
Merged

GH-47389: [Python] CSV and JSON options lack a nice repr/str#47397
AlenkaF merged 11 commits into
apache:mainfrom
thisisnic:GH-47359_repr_str_csv_json

Conversation

@thisisnic

@thisisnic thisisnic commented Aug 21, 2025

Copy link
Copy Markdown
Member

Rationale for this change

CSV and JSON options lack a nice repr/str dunder method

What changes are included in this PR?

Add both these methods

Are these changes tested?

Will be once it's ready for review

Are there any user-facing changes?

No

@thisisnic
thisisnic marked this pull request as ready for review August 25, 2025 13:48

@AlenkaF AlenkaF left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @thisisnic!

My first thought was whether we could simplify this to avoid hardcoding all the options, but nothing simpler comes to mind — I don't think we can easily loop over attributes in a Cython cdef class.

So overall, no big concerns — just one note about a missing option and a small nit.

Comment thread python/pyarrow/_csv.pyx Outdated
Comment thread python/pyarrow/tests/test_csv.py Outdated
@github-actions github-actions Bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting committer review Awaiting committer review awaiting changes Awaiting changes labels Sep 1, 2025

@AlenkaF AlenkaF left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Two more comments from me.

Comment thread python/pyarrow/_csv.pyx
Comment thread python/pyarrow/_csv.pyx Outdated
@AlenkaF
AlenkaF force-pushed the GH-47359_repr_str_csv_json branch from b1177bc to 2b3354b Compare October 23, 2025 17:09
@AlenkaF

AlenkaF commented Oct 24, 2025

Copy link
Copy Markdown
Member

@pitrou mind having a quick look?

Comment thread python/pyarrow/_csv.pyx
@thisisnic
thisisnic force-pushed the GH-47359_repr_str_csv_json branch from fdcdefe to 82dc9ad Compare March 11, 2026 04:46
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Mar 11, 2026
@thisisnic
thisisnic force-pushed the GH-47359_repr_str_csv_json branch from 82dc9ad to 552771e Compare March 17, 2026 10:06
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Mar 17, 2026
@AlenkaF

AlenkaF commented Mar 19, 2026

Copy link
Copy Markdown
Member

Thanks for the changes @thisisnic!
I plan to merge this PR today/tomorrow in case there are no other comments.

@AlenkaF
AlenkaF merged commit 618d5fb into apache:main Mar 25, 2026
16 checks passed
@AlenkaF AlenkaF removed the awaiting change review Awaiting change review label Mar 25, 2026
@AlenkaF

AlenkaF commented Mar 25, 2026

Copy link
Copy Markdown
Member

Thanks @thisisnic !

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 618d5fb.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.

thisisnic added a commit to thisisnic/arrow that referenced this pull request Apr 6, 2026
…pache#47397)

### Rationale for this change

CSV and JSON options lack a nice repr/str dunder method

### What changes are included in this PR?

Add both these methods

### Are these changes tested?

Will be once it's ready for review

### Are there any user-facing changes?

No
* GitHub Issue: apache#47389

Lead-authored-by: Nic Crane <thisisnic@gmail.com>
Co-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Signed-off-by: AlenkaF <frim.alenka@gmail.com>
Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
…pache#47397)

### Rationale for this change

CSV and JSON options lack a nice repr/str dunder method

### What changes are included in this PR?

Add both these methods

### Are these changes tested?

Will be once it's ready for review

### Are there any user-facing changes?

No
* GitHub Issue: apache#47389

Lead-authored-by: Nic Crane <thisisnic@gmail.com>
Co-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Signed-off-by: AlenkaF <frim.alenka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants